package org.jeecg.modules.monitoring.j_monitoring.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.monitoring.j_monitoring.entity.GatewayWarning;
import org.jeecg.modules.monitoring.j_monitoring.entity.GatewayWarningCount;

import java.util.List;
import java.util.Map;

/**
 * @Description: 网关告警服务
 * @Author: xiaoyq
 * @Date:   2023-05-09
 * @Version: V1.0
 */
public interface IGatewayWarningService extends IService<GatewayWarning> {
    /**
     * 同步网关告警
     */
    void syncGatewayWarning();

    /**
     * 获得告警数量
     * @param fdn
     * @return
     */
    GatewayWarningCount getWarningCount(String fdn);

    /**
     * 根据IP获得告警组
     * @param ipList
     * @return
     */
    Map<String,GatewayWarning> getWarningGroupByIp(List<String> ipList);

    /**
     * 根据IP获得告警组
     * @param ipList
     * @return
     */
    Map<String,List<GatewayWarning>> getWarningListGroupByIp(List<String> ipList);

    /**
     * 删除所有告警历史
     */
    void removeAll();
}
